package com.weipai.springboot.module.mapper;

import com.weipai.springboot.model.GoodsCollection;
import com.weipai.springboot.model.ShopCollection;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ShopCollectionMapper {

    //取消 店铺收藏
    int deleteByPrimaryKey(@Param("customerId")String customerId, @Param("shopId")String shopId);

    int insert(ShopCollection record);

    int insertSelective(ShopCollection record);

    ShopCollection selectByPrimaryKey(String collectionId);

    int updateByPrimaryKeySelective(ShopCollection record);

    int updateByPrimaryKey(ShopCollection record);

    //根据 客户id ,  查询 商铺
    List<ShopCollection> selectAllByShopCollection(@Param("customerId") String customerId, @Param("page")Integer page, @Param("size")Integer size);

    //  一个商铺有 多少人收藏
    int countByShopId(@Param("shopId") String shopId);

    //验证是否存在此商店
    List<ShopCollection> verGoodsCollection(@Param("customerId")String customerId, @Param("shopId")String shopId);

    //一键清空 商店收藏
    int deleteByAllShop(@Param("customerId")String customerId);
}